Skip to content

[stable5.4] fix(api): keep the sub type of a question fixed after creation - #3976

Merged
AndyScherzinger merged 1 commit into
stable5.4from
backport/3975/stable5.4
Nov 21, 2026
Merged

AndyScherzinger merged 1 commit into
stable5.4from
backport/3975/stable5.4

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 21, 2026

Copy link
Copy Markdown

Backport of PR #3975

updateQuestion rejects a change of `type`, but a PATCH could still
change, add or remove `extraSettings.questionType`. A grid question
could switch from radio to number after it already had answers, and
the stored answers no longer matched the question.

Reject an `extraSettings` update whose `questionType` differs from the
stored one, with the same 403 response the `type` check uses. The
check applies to every question type, so sub types added later are
covered as well. The web frontend always sends the stored extra
settings back, so normal editing is not affected.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AndyScherzinger
AndyScherzinger merged commit f0b1309 into stable5.4 Nov 21, 2026
51 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/3975/stable5.4 branch November 21, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants